package com.emm.yixun.common.enums;

import org.apache.commons.lang.StringUtils;

public enum HouseTypeEnum {
	HOUSETYPE_0("0","公寓"),
	HOUSETYPE_1("1","别墅"),
	HOUSETYPE_2("2","车位")
	;
	private String code;
	private String name;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	private HouseTypeEnum(String code, String name) {
		this.code = code;
		this.name = name;
	}
	private HouseTypeEnum() {
	}
	
	public static HouseTypeEnum getByCode(String no) {
		if(StringUtils.isBlank(no)){
			return null;
		}
		for (HouseTypeEnum menum : values()) {
			if (menum.getCode().equals(no)) {
				return menum;
			}
		}
		return null;
	}
	
}
